<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"%>    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="./css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="javascript">
<!--
	function back(){
		window.location.href = "roleManage.html";
		window.location.target = "main";
	}
	
	function addUser(){
		window.parent.location.href = "./user.do?action=preAddUser";
		window.location.target = "main";
	}
	
	function updateUser(){
		window.parent.location.href = "updateUser.html";
		window.location.target = "main";
	}
	
	function viewUser(){
		window.parent.location.href = "viewUser.html";
		window.location.target = "main";
	}
-->
</script>
</head>
<body>
	<a class="common_title">>> 您现在的位置：基础设置 >> 用户管理</a>
	
	<div class="tools">
		<a class="save" href="javascript:addUser();" title="新增" hidefocus="true">新增</a>&nbsp;&nbsp;
		<a class="stop" href="#" title="停用" hidefocus="true">停用</a>&nbsp;&nbsp;
		<a class="del" href="#" title="删除" hidefocus="true">删除</a>&nbsp;&nbsp;
	</div>
	
	<table class="table_style" height="30" cellpadding="0" cellspacing="0">
		<tr>
			<td class="title3">
				用户状态：
				<select>
					<option value="0">--------请选择--------</option>
					<option value="1">正常用户</option>
					<option value="2">停用用户</option>
				</select>&nbsp;&nbsp;&nbsp;&nbsp;
				<input class="btn1" type="button" value="查 询"/>
			</td>
		</tr>
	</table>
	
	<table class="table_style" style="text-align: center;">
		<tr>
			<td class="title">选择</td>
			<td class="title">用户编号</td>
			<td class="title">用户姓名</td>
			<td class="title">所属部门</td>
			<td class="title">所属角色</td>
			<td class="title">Email</td>
			<td class="title">操作</td>
		</tr>
		<c:forEach var="user" items="${users}">
		<!-- c:if test="${user.activity == 1}" -->
		<tr>
			<td><input type="checkbox"/></td>
			<td>${user.userCode}</td>
			<td><a href="javascript:viewUser();">${user.userName}</a></td>
			<td>销售部</td>
			<td>一般用户</td>
			<td>test@feeyin.com</td>
			<td><img class="btn_img" src="../../images/a_update.gif" onclick="updateUser()" title="修改"></td>
		</tr>
		<!-- /c:if -->
		</c:forEach>
	</table>
	
	<!-- page 
	<table class="table_page" cellpadding="0" cellspacing="0">
		<tr>
			<td class="title">
			</td>
			<td class="title">
				${totalRows}条,共${totalPages}页,第${currentPage}页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<a href="./user.do?action=userList&currentPage=0&flag=1" target="userListFrame" hidefocus="true">第一页</a>&nbsp;&nbsp;&nbsp;&nbsp;
				<c:choose>
					<c:when test="${currentPage - 1 > 0}">
					<a href="./user.do?action=userList&currentPage=${currentPage}&flag=2" target="userListFrame" hidefocus="true">上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</c:when>
					<c:otherwise><a>上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;</c:otherwise>
				</c:choose>
				<c:choose>
					<c:when test="${currentPage + 1 < totalPages}">
					<a href="./user.do?action=userList&currentPage=${currentPage}&flag=3" target="userListFrame" hidefocus="true">下一页</a>&nbsp;&nbsp;&nbsp;&nbsp;
					</c:when>
					<c:otherwise><a>下一页</a>&nbsp;&nbsp;&nbsp;&nbsp;</c:otherwise>
				</c:choose>
				<a href="./user.do?action=userList&currentPage=${totalPages}&flag=4" target="userListFrame" hidefocus="true">最后一页</a>
			</td>
			<td class="title"></td>
		</tr>
	</table>
	-->
	
	
	<!-- page -->
	<table class="table_page" cellpadding="0" cellspacing="0">
		<tr>
			<td class="title">
			</td>
			<td class="title">
				${totalRows}条,共${totalPages}页,第${currentPage}页&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				<a href="./user.do?action=userList&flag=1" target="userListFrame" hidefocus="true">第一页</a>&nbsp;&nbsp;&nbsp;&nbsp;
				<a href="./user.do?action=userList&flag=2" target="userListFrame" hidefocus="true">上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;
				<a href="./user.do?action=userList&flag=3" target="userListFrame" hidefocus="true">下一页</a>&nbsp;&nbsp;&nbsp;&nbsp;
				<a href="./user.do?action=userList&flag=4" target="userListFrame" hidefocus="true">最后一页</a>
			</td>
			<td class="title"></td>
		</tr>
	</table>
	
</body>
</html>